<template>
    <div class="table">
        <div class="divSearch">
            <!--搜索框-->
            <Row>
                <!--根据需求删除不不要查询条件-->
                <Col :lg="{span:5}" :md="{span:4}" :sm="{span:8}" :xs="{span:20}">
                <label class="searchLabel">县&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(市):</label>
                <!--<Cascader :data="AreaList" change-on-select @on-change='SearchCascaderChange' class="searchInput" style="float:left"></Cascader>-->
                    <Select v-model="searchModel.AreaCode"  placeholder="请选择..." class="searchInput" @on-change="getPageData()">
                        <Option :value="userinfo.AreaCode">全部</Option>
                        <Option :value="item.value" v-for="item in AreaList" :key="item.value">{{item.label}}</Option>
                    </Select>
                </Col>
                <Col :lg="{span:5}" :md="{span:4}" :sm="{span:8}" :xs="{span:20}">
                <label class="searchLabel">填报年度:</label>
                <Select v-model="searchModel.FillInYear"  placeholder="请选择..." class="searchInput" @on-change="getPageData()">
                    <Option value="">全部</Option>
                    <Option :value="item.DictText" v-for="item in CreateYearList" :key="item.DictText">{{item.DictText}}</Option>
                </Select>
                </Col>
                <!--<Col :lg="{span:5}" :md="{span:4}" :sm="{span:8}" :xs="{span:20}">
                <label class="searchLabel">时间周期:</label>
                <Select v-model="searchModel.TimesType" placeholder="全部" class="searchInput">
                    <Option value="">全部</Option>
                    <Option :value="item.DictValue" v-for="item in CycleList" :key="item.DictValue">{{item.DictText}}</Option>
                </Select>
                </Col>-->
                <Col :lg="{span:5}" :md="{span:4}" :sm="{span:8}" :xs="{span:20}">
                <label class="searchLabel">报表状态:</label>
                <Select v-model="searchModel.Status"  placeholder="请选择..." class="searchInput" @on-change="getPageData()">
                    <Option value="">全部</Option>
                    <Option :value="item.DictValue" v-for="item in StatusList" :key="item.DictValue">{{item.DictText}}</Option>
                </Select>
                </Col>
                <!-- <Col :lg="{span:2}" :md="{span:2}" :sm="{span:2}" :xs="{span:2}">
                <Button icon="ios-search" type="primary" @click="getPageData()" class="searchButton">查询</Button>
                </Col> -->
            </Row>
        </div>
        <Row>
            <Col span="24">
            <Table :context="self" ref="table" border :stripe=true :columns="TableHeader" :data="datas.rows" size="large" :height="clientHeight">
            </Table>
            </Col>
        </Row>
        <Row>
            <Col span="24">
            <Page class="pageComponent" :total="datas.total" placement="top" @on-change="getPageNumber" :page-size="searchModel.PageSize" :page-size-opts='pageSizeOpts' show-sizer @on-page-size-change="getPageSize" show-total show-elevator></Page>
            </Col>
        </Row>
        <!--***********************************************数据查看框**************************************************-->
        <Modal v-model="ViewType" :mask-closable="false" width="800" :styles="{top: '20px'}">
            <p slot="header" class="title">
                <Icon type="ios-paper" size="20"></Icon>
                <span style="font-size: 20px">{{searchModel.FillInYear}}-{{CurrentAreaName}}-(八)蔬菜生产经营实体及相关情况(全面统计)</span>
            </p>
            <p slot="close">
                <Icon type="close-circled" color="red" size=25></Icon>
            </p>
            <table class="reportTable">
                <thead>
                    <!-- <tr><td colspan="4" class="tdLeft">县(市、区)：         填报机关名称：  </td></tr> -->
                    <tr>
                        <td width="55%"></td>
                        <td width="15%">汇总代码</td>
                        <td width="15%">单位</td>
                        <td width="15%">数量</td>
                    </tr>
                    <tr><td>甲</td><td>乙</td><td>丙</td><td>1</td></tr>
                </thead>
                <tr  class="disableTd">
                    <td class="tdLeft">一、蔬菜市场个数</td>
                    <td>01</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.PFSC_Num}}</td>
                </tr>
                <tr>
                    <!-- <td>龙头企业总数</td> -->
                    <td class="tdLeftOne">其中：产地批发市场</td>
                    <td>02</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.PFSC_Cd}} </td>
                </tr>
                    <tr>
                    <td class="tdLeftTwo">专业批发市场</td>
                    <td>03</td>
                    <td>个</td>
                    <td>{{DataModel.PFSC_Zy}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">区域性综合批发市场</td>
                    <td>04</td>
                    <td>个</td>
                    <td>{{DataModel.PFSC_Qy}}</td>
                </tr>
                <tr  class="disableTd">
                    <td class="tdLeft">二、蔬菜企业个数</td>
                    <td>05</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.VegCompanyNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">其中：国家级龙头企业</td>
                    <td>06</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.ZzNum_Country}}</td>
                </tr>
                    <tr>
                    <td class="tdLeftTwo">省级龙头企业</td>
                    <td>07</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_Pro}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">州(市)级龙头企业</td>
                    <td>08</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_City}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">县(市,区)级龙头企业</td>
                    <td>09</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_Area}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">其他龙头企业</td>
                    <td>10</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_Other}}</td>
                </tr>
                <tr  class="disableTd">
                    <td  class="tdLeft">三、蔬菜农民合作社</td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">1.蔬菜专业合作组织数量</td>
                    <td>11</td>
                    <td>个</td>
                    <td>{{DataModel.VegHzNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">2.参加蔬菜农民合作社农户数</td>
                    <td>12</td>
                    <td>户</td>
                    <td>{{DataModel.VegNhNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">3.蔬菜农民合作社经营面积</td>
                    <td>13</td>
                    <td>亩</td>
                    <td>{{DataModel.VegMjNum}}
                    </td>
                </tr>
                <tr>
                    <td class="tdLeftOne">4.蔬菜农民合作社年销售收入</td>
                    <td>14</td>
                    <td>万元</td>
                    <td>{{DataModel.VegHzSale}}</td>
                </tr>
                <tr  class="disableTd">
                    <td class="tdLeft">四、蔬菜家庭农场</td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="tdLeftOne">1.蔬菜家庭农场数量</td>
                    <td>15</td>
                    <td>个</td>
                    <td>{{DataModel.JTNC_Num}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">2.参加蔬菜家庭农场农户数</td>
                    <td>16</td>
                    <td>户</td>
                    <td>{{DataModel.JTNC_NMNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">3.蔬菜家庭农场经营面积(其中:流转土地面积)</td>
                    <td>17</td>
                    <td>亩</td>
                    <td>{{DataModel.JTNC_Area}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">4.蔬菜家庭农场年销售收入</td>
                    <td>18</td>
                    <td>万元</td>
                    <td>{{DataModel.JTNC_Sales}}</td>
                </tr>
                <tr  class="disableTd">
                    <td  class="tdLeft">五、相关质量标准认证情况</td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(一)国家级农业标准化示范县数量</td>
                    <td>19</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Sfx}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(二)出口食品农产品质量安全示范区数量</td>
                    <td>20</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Sfq}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(三)中国驰名商标数</td>
                    <td>21</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Cmsbs}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(四)中国名牌产品数</td>
                    <td>22</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Mpcp}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(五)云南省著名商标署</td>
                    <td>23</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_YnsZmsb}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(六)无公害农产品数量</td>
                    <td>24</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_WghNum}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(七)无公害农产品认证面积</td>
                    <td>25</td>
                    <td>亩</td>
                    <td>{{DataModel.ZlrzNum_Wghmj}} </td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(八)绿色产品数</td>
                    <td>26</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Greencp}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(九)绿色产品认证面积</td>
                    <td>27</td>
                    <td>亩</td>
                    <td>{{DataModel.ZlrzNum_Greencpmj}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(十)地理标志证明商标数</td>
                    <td>28</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Dlsb}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(十一)地理标志产品保护认证数</td>
                    <td>29</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Dlbh}}</td>
                </tr>
            </table>              
            <div slot="footer">
                <Alert class="alert" banner type="error">
                    <p>填报时间：每年1月10日</p>
                    <p>1.全省范围内从乡（镇）起，逐级全面统计，由县级填报经州（市）审核后上报。</p>
                    <span slot="desc">
                    </span>
                </Alert>
            </div>
        </Modal>
        <!--***********************************************数据审核框**************************************************-->
        <Modal v-model="AuthType" :mask-closable="false" width="800" :styles="{top: '20px'}">
            <p slot="header" class="title">
                <Icon type="ios-paper" size="20"></Icon>
                <span style="font-size: 20px">{{searchModel.FillInYear}}-{{CurrentAreaName}}-(八)蔬菜生产经营实体及相关情况(全面统计)</span>
            </p>
            <p slot="close">
                <Icon type="close-circled" color="red" size=25></Icon>
            </p>
            <table class="reportTable">
                <thead>
                    <!-- <tr><td colspan="4" class="tdLeft">县(市、区)：         填报机关名称：  </td></tr> -->
                    <tr>
                        <td width="55%"></td>
                        <td width="15%">汇总代码</td>
                        <td width="15%">单位</td>
                        <td width="15%">数量</td>
                    </tr>
                    <tr><td>甲</td><td>乙</td><td>丙</td><td>1</td></tr>
                </thead>
                <tr  class="disableTd">
                    <td class="tdLeft">一、蔬菜市场个数</td>
                    <td>01</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.PFSC_Num}}</td>
                </tr>
                <tr>
                    <!-- <td>龙头企业总数</td> -->
                    <td class="tdLeftOne">其中：产地批发市场</td>
                    <td>02</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.PFSC_Cd}} </td>
                </tr>
                    <tr>
                    <td class="tdLeftTwo">专业批发市场</td>
                    <td>03</td>
                    <td>个</td>
                    <td>{{DataModel.PFSC_Zy}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">区域性综合批发市场</td>
                    <td>04</td>
                    <td>个</td>
                    <td>{{DataModel.PFSC_Qy}}</td>
                </tr>
                <tr  class="disableTd">
                    <td class="tdLeft">二、蔬菜企业个数</td>
                    <td>05</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.VegCompanyNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">其中：国家级龙头企业</td>
                    <td>06</td>
                    <td>个</td>
                    <td class="disableTd">{{DataModel.ZzNum_Country}}</td>
                </tr>
                    <tr>
                    <td class="tdLeftTwo">省级龙头企业</td>
                    <td>07</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_Pro}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">州(市)级龙头企业</td>
                    <td>08</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_City}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">县(市,区)级龙头企业</td>
                    <td>09</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_Area}}</td>
                </tr>
                <tr>
                    <td class="tdLeftTwo">其他龙头企业</td>
                    <td>10</td>
                    <td>个</td>
                    <td>{{DataModel.ZzNum_Other}}</td>
                </tr>
                <tr  class="disableTd">
                    <td  class="tdLeft">三、蔬菜农民合作社</td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">1.蔬菜专业合作组织数量</td>
                    <td>11</td>
                    <td>个</td>
                    <td>{{DataModel.VegHzNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">2.参加蔬菜农民合作社农户数</td>
                    <td>12</td>
                    <td>户</td>
                    <td>{{DataModel.VegNhNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">3.蔬菜农民合作社经营面积</td>
                    <td>13</td>
                    <td>亩</td>
                    <td>{{DataModel.VegMjNum}}
                    </td>
                </tr>
                <tr>
                    <td class="tdLeftOne">4.蔬菜农民合作社年销售收入</td>
                    <td>14</td>
                    <td>万元</td>
                    <td>{{DataModel.VegHzSale}}</td>
                </tr>
                <tr  class="disableTd">
                    <td class="tdLeft">四、蔬菜家庭农场</td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="tdLeftOne">1.蔬菜家庭农场数量</td>
                    <td>15</td>
                    <td>个</td>
                    <td>{{DataModel.JTNC_Num}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">2.参加蔬菜家庭农场农户数</td>
                    <td>16</td>
                    <td>户</td>
                    <td>{{DataModel.JTNC_NMNum}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">3.蔬菜家庭农场经营面积(其中:流转土地面积)</td>
                    <td>17</td>
                    <td>亩</td>
                    <td>{{DataModel.JTNC_Area}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">4.蔬菜家庭农场年销售收入</td>
                    <td>18</td>
                    <td>万元</td>
                    <td>{{DataModel.JTNC_Sales}}</td>
                </tr>
                <tr  class="disableTd">
                    <td  class="tdLeft">五、相关质量标准认证情况</td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(一)国家级农业标准化示范县数量</td>
                    <td>19</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Sfx}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(二)出口食品农产品质量安全示范区数量</td>
                    <td>20</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Sfq}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(三)中国驰名商标数</td>
                    <td>21</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Cmsbs}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(四)中国名牌产品数</td>
                    <td>22</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Mpcp}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(五)云南省著名商标署</td>
                    <td>23</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_YnsZmsb}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(六)无公害农产品数量</td>
                    <td>24</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_WghNum}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(七)无公害农产品认证面积</td>
                    <td>25</td>
                    <td>亩</td>
                    <td>{{DataModel.ZlrzNum_Wghmj}} </td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(八)绿色产品数</td>
                    <td>26</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Greencp}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(九)绿色产品认证面积</td>
                    <td>27</td>
                    <td>亩</td>
                    <td>{{DataModel.ZlrzNum_Greencpmj}}</td>
                </tr>
                <tr>
                    <td  class="tdLeftOne">(十)地理标志证明商标数</td>
                    <td>28</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Dlsb}}</td>
                </tr>
                <tr>
                    <td class="tdLeftOne">(十一)地理标志产品保护认证数</td>
                    <td>29</td>
                    <td>个</td>
                    <td>{{DataModel.ZlrzNum_Dlbh}}</td>
                </tr>
            </table> 
            <div slot="footer">
                <div style="text-align:right;padding-top:5px;">
                    <Button type="primary" @click="authSure()">审核通过</Button>
                    <Button type="warning" @click="authUnSure()">退回重报</Button>
                    <!--<Button type="ghost" @click="cancel()" style="margin-left: 5px">取消</Button>-->
                </div>
                <Alert class="alert" banner type="error">
                    <p>填报时间：每年1月10日</p>
                    <p>1.全省范围内从乡（镇）起，逐级全面统计，由县级填报经州（市）审核后上报。</p>
                    <span slot="desc"></span>
                </Alert>
            </div>
        </Modal>
        <!--***********************************************退回重报(意见箱)**************************************************-->
        <Modal v-model="showAudit" :mask-closable="false" width="500">
            <p slot="header" class="title">
                <Icon type="ios-paper" size="20"></Icon>
                <span style="font-size: 20px">审核不通过原因</span>
            </p>
            <p slot="close">
                <Icon type="close-circled" color="red" size=25></Icon>
            </p>
            <Input v-model="strMsg" type="textarea" :rows="4" placeholder="请输入不通过原因..."></Input>
            <div slot="footer">
                <Button type="primary" @click="sureUnSure()">确定</Button>
                <Button type="ghost" @click="cancelUnSure()" style="margin-left: 8px">取消</Button>
            </div>
        </Modal>
    </div>
</template>
<script>
export default {
    data() {
        return {
            value: '', //理由
            self: this,
            //*************数据审核*************\\
            Id: '',
            strMsg: '',
            AuthType: false, //审核框状态开关
            CurrentYear: this.GetCurrentYear(),//当前年度
            CurrentAreaName:'',
            showAudit: false, //审核不通过理由填报框状态开关
            userinfo: this.GetlocaStorage("VegUserInfo"),
            //**************************\\
            TableCodeList: this.GetGroupDict("ReportTableName"), //表名称
            CreateYearList: this.GetGroupDict("ReportYear"), //周期
            CycleList: this.GetGroupDict("ReportCycle"), //
            StatusList: this.GetGroupDict("ReportStatus"),
            TabTitleList: [], //tab选项卡列表
            AreaList: [], //所属行政区划数组,
            selectTabName: '',
            ViewType: false, //查看框状态开关
            TableHeader: [
                // {type: 'selection',width: 60,align: 'center'},
                {
                    title: '报表名称',
                    key: 'ReportCodeName',
                    ellipsis: true
                },
                // {
                //     title: '所属地区',
                //     key: 'AreaCodeName',
                //     width: 150
                // },
                // {
                //     title: '填报年度',
                //     key: 'FillInYearName',
                //     width: 150
                // },
                // {
                //     title: '填报周期',
                //     key: 'TimesTypeName',
                //     width: 110
                // },
                // {
                //     title: '周期详情',
                //     key: 'TimesCycleName',
                //     width: 110
                // },
                {
                    title: "报表状态",
                    key: "StatusName",
                    width: 150,
                    render: (h, params) => {
                        switch (params.row.Status * 1) {
                            case 0: //审核未通过
                                return h('span', { class: { Error: true } }, params.row.StatusName);
                            case 1: //未填报
                                return h('span', { class: { NoReport: true } }, params.row.StatusName);
                            case 2: //已填报
                                return h('span', { class: { AlreadyReport: true } }, params.row.StatusName);
                            case 3: //已上报
                                return h('span', { class: { UpReport: true } }, params.row.StatusName);
                            case 4: //审核通过
                                return h('span', { class: { Success: true } }, params.row.StatusName);
                            case 5: //锁定
                                return h('span', { class: { error: true } }, params.row.StatusName);
                            default:
                                return h('span', { class: { Default: true } }, params.row.StatusName);
                        }
                    }
                },
                {
                    title: '添加时间',
                    key: 'StrAddTime',
                    width: 180
                },
                {
                    title: '操作',
                    key: 'action',
                    width: 260,
                    align: 'center',
                    render: (h, params) => {
                        return h('div', [
                            h('Button', {
                                class: { ieditColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'ios-compose'
                                },
                                style: {
                                    marginRight: '5px'
                                },
                                on: {
                                    click: () => {
                                        this.See(params.row.FillInYearName, params.row.AreaCode,params.row.AreaCodeName)
                                    }
                                }
                            }, '查看'),
                            h('Button', {
                                class: { irefreshColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'android-cloud-done', disabled: params.row.Status == 4 || params.row.Status < 3
                                },
                                style: {
                                    marginRight: '5px'
                                },
                                on: {
                                    click: () => {
                                        this.ShowAuthModal(params.row.Id, params.row.ReportCode,params.row.AreaCodeName)
                                    }
                                }
                            }, '审核'),
                            h('Button', {
                                class: { ideleteColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'ios-undo',disabled: params.row.Status !=4
                                },
                                style: {
                                    marginRight: '5px'
                                },
                                on: {
                                    click: () => {
                                        this.unReview(params.row.Id)
                                    }
                                },
                                directives: [
                                    {
                                        name: 'omg-operation',
                                        value: { op: "unreview" }
                                    }
                                ]
                            }, '取消审核'),
                        ])
                    }
                }
            ],
            IsEdit: false, //是否编辑
            IsUp: false, //是否上报
            //查询模型：根据需求删除不不要查询条件
            //蔬菜生产情况表代码
            searchModel: {
                Id: '',
                ReportCode: 'VegProsecution',
                FillInYear: '',
                TimesType: '',
                AreaCode: this.GetlocaStorage("VegUserInfo").AreaCode,
                PageNumber: 1,
                PageSize: 20,
                Status: '',
                Opinion: ''
            },
            DataModel: {//编辑模型
                Id: 0,
                ReportId: '',
                PFSC_Num: '',
                PFSC_Cd: '',
                PFSC_Zy: '',
                PFSC_Qy: '',
                VegCompanyNum: '',
                ZzNum_Country: '',
                ZzNum_Pro: '',
                ZzNum_City: '',
                ZzNum_Area: ''
                ,ZzNum_Other: ''
                ,VegHzNum: ''
                ,VegNhNum: ''
                ,VegMjNum: ''
                ,JTNC_Num: ''
                ,JTNC_NMNum: ''
                ,JTNC_Area: ''
                ,JTNC_Sales: ''
                ,ZlrzNum_Sfx: ''
                ,ZlrzNum_Sfq: ''
                ,ZlrzNum_Cmsbs: ''
                ,ZlrzNum_Mpcp: ''
                ,ZlrzNum_YnsZmsb: ''
                ,ZlrzNum_WghNum: ''
                ,ZlrzNum_Wghmj: ''
                ,ZlrzNum_Greencp: ''
                ,ZlrzNum_Greencpmj: ''
                ,ZlrzNum_Dlsb: ''
                ,ZlrzNum_Dlbh: ''
                ,Remark: ''
                ,ReportStatus: '',
                //*******上年数据 */
                OldId: 0,
                OldReportId: '',
                OldPFSC_Num: '',
                OldPFSC_Cd: '',
                OldPFSC_Zy: '',
                OldPFSC_Qy: '',
                OldVegCompanyNum: '',
                OldZzNum_Country: '',
                OldZzNum_Pro: '',
                OldZzNum_City: '',
                OldZzNum_Area: ''
                ,OldZzNum_Other: ''
                ,OldVegHzNum: ''
                ,OldVegNhNum: ''
                ,OldVegMjNum: ''
                ,OldJTNC_Num: ''
                ,OldJTNC_NMNum: ''
                ,OldJTNC_Area: ''
                ,OldJTNC_Sales: ''
                ,OldZlrzNum_Sfx: ''
                ,OldZlrzNum_Sfq: ''
                ,OldZlrzNum_Cmsbs: ''
                ,OldZlrzNum_Mpcp: ''
                ,OldZlrzNum_YnsZmsb: ''
                ,OldZlrzNum_WghNum: ''
                ,OldZlrzNum_Wghmj: ''
                ,OldZlrzNum_Greencp: ''
                ,OldZlrzNum_Greencpmj: ''
                ,OldZlrzNum_Dlsb: ''
                ,OldZlrzNum_Dlbh: ''
                ,OldRemark: ''
                ,OldReportStatus: ''
            },
            pageSizeOpts: [20, 40, 50], //默认分页最大设置
            datas: {}, //table数据对象
            dataIds: [],
            ctx: this, //table数据上下文
            clientHeight: window.innerHeight - 300, //表格默认高度
        }
    },
    mounted() {
        //table高度计算方法
        const that = this;
        window.onresize = () => {
            return (() => {
                that.clientHeight = window.innerHeight - 300;
            })()
        };
    },
    methods: {
        //初始化行政区划树
        // SearchAreaList() {
        //     var areaCode = this.userinfo.AreaCode;
        //     if (areaCode != '530000000000' && areaCode != null) {
        //         var item = this.GetlocaStorage("areatreelist")[0];
        //         for (var i = 0; i < item.children.length; i++) {
        //             if (item.children[i].value == areaCode) {
        //                 this.AreaList.push(item.children[i]);
        //             }
        //         }
        //     } else {

        //         this.AreaList = this.GetlocaStorage("areatreelist");
        //     }
        //      console.log(this.AreaList);
        // },
        SearchAreaList() {
            var areaCode = this.userinfo.AreaCode;
            var areaList=[];
            if (areaCode != '530000000000' && areaCode != null) {
                var item = this.GetlocaStorage("areatreelist")[0];
                for (var i = 0; i < item.children.length; i++) {
                    if (item.children[i].value == areaCode) {
                        areaList.push(item.children[i]);
                    }
                }
            } else {

                areaList = this.GetlocaStorage("areatreelist");
            }
             this.AreaList=areaList[0].children;
        },
        //查询行政区划级联选择
        // SearchCascaderChange(value, selectedData) {
        //     const index = value.length - 1;
        //     this.searchModel.AreaCode = value[index];
        // },
        // See: function (id, reportCode) { //数据查看
        //     var self = this;
        //     self.$http.get("Report", {
        //         params: {
        //             id: id,
        //             reportCode: reportCode
        //         }
        //     }).then( //获取数据编辑项的值
        //         function (res) {
        //             switch (res.data.list.status) {
        //                 case 1:
        //                     self.initTab(self, res.data.list.model);
        //                     self.ViewType = true;
        //                     break;
        //                 case 0:
        //                     self.$Modal.error({
        //                         title: "提示信息",
        //                         content: "数据加载失败!!!"
        //                     });
        //                     break;
        //                 case -1:
        //                     self.$Modal.error({
        //                         title: "提示信息",
        //                         content: "数据加载失败!!!"
        //                     });
        //                     break;
        //             }
        //         });
        // },
        See: function (FillInYear,AreaCode,AreaName) {
            var self = this;
            self.CurrentAreaName=AreaName;
            var model = new Object();
            model.ReportCode = self.searchModel.ReportCode;
            model.FillInYear = FillInYear;
            model.AreaCode = AreaCode;
            self.DataModel={};//清空当前数据            
            self.$http.post("Report/PostData", model).then( //获取数据编辑项的值
                function (res) {
                    console.log(res);
                    if (res.data.list.status == 2 || res.data.list.status == 1) {         
                        self.DataModel = res.data.list.model;
                        self.ViewType = true;
                    } else {
                        self.DataModel = res.data.model;
                        self.$Modal.warning({
                            title: "提示信息",
                            content: res.data.message
                        });
                        self.BtnSaveStatus = false;
                    }
                }
            );
        },
        //获取当前页码
        getPageNumber(pageIndex) {
            this.searchModel.PageNumber = pageIndex;
            this.getPageData();
        },
        //获取当前分页大小
        getPageSize(pageSize) {
            this.searchModel.PageSize = pageSize;
            this.getPageData();
        },
        //获取this.datas: {},//table数据对象
        getPageData() {
            var self = this;
            if (self.searchModel.FillInYear != null && self.searchModel.FillInYear != '') {
                self.searchModel.FillInYear = self.searchModel.FillInYear;
            } else {
                self.searchModel.FillInYear = self.CurrentYear + '年';//填报年度-----数据字典值
            }
            self.$http.post('Report/PostPageList', self.searchModel).then(function (res) {
                if (res.data.status === 1) {
                    self.datas = res.data;
                } else {
                    self.$Modal.error({
                        title: '提示信息',
                        content: res.data.message
                    });
                }
            });
        },
        initTab(self, datas) {
            self.TabTitleList = [];
            for (var i = 0; i < datas.length; i++) {
                if (!self.checkTab(datas[i].SortCode, self)) {
                    var item = new Object();
                    item.SortCode = datas[i].SortCode;
                    item.SortName = datas[i].SortName;
                    item.list = [];
                    for (var j = 0; j < datas.length; j++) {
                        if (datas[j].SortCode == datas[i].SortCode) {
                            if (!self.checkItem(item.list, datas[j].ItemCode)) {
                                item.list.push(datas[j]);
                            }
                        }
                    }
                    self.TabTitleList.push(item);
                }
            }
            return self.TabTitleList;
        },
        checkTab(SortCode, self) {
            var res = false;
            for (var i = 0; i < self.TabTitleList.length; i++) {
                if (self.TabTitleList[i].SortCode == SortCode) {
                    res = true;
                }
            }
            return res;
        },
        checkItem(datas, ItemCode) {
            var res = false;
            for (var i = 0; i < datas.length; i++) {
                if (datas[i].ItemCode == ItemCode) {
                    res = true;
                }
            }
            return res;
        },
        findItemList(tabname) {
            var list = [];
            for (var i = 0; i < this.TabTitleList.length; i++) {
                if (this.TabTitleList[i].SortCode == tabname) {
                    list = this.TabTitleList[i].list;
                    break;
                }
            }
            return list;
        },
        ShowAuthModal: function (id, reportCode,AreaName) { //审核数据加载。。。。
            var self = this;
            self.CurrentAreaName=AreaName;
            self.$http.get("Report", {
                params: {
                    id: id,
                    reportCode: reportCode
                }
            }).then( //获取数据编辑项的值
                function (res) {
                    switch (res.data.list.status) {
                        case 1:
                            self.DataModel = res.data.list.model;
                            self.Id = id;
                            self.AuthType = true;
                            break;
                        case 0:
                            self.$Modal.error({
                                title: "提示信息",
                                content: "数据加载失败!!!"
                            });
                            break;
                        case -1:
                            self.$Modal.error({
                                title: "提示信息",
                                content: "数据加载失败!!!"
                            });
                            break;
                    }
                }
                );
        },
        //省级取消审核
        unReview(id) {
            this.DataReview(id, '0', '省级已取消审核!');
        },
        authSure: function () { //审核通过
            this.DataReview(this.Id, '4', '');
            this.AuthType=false;
        },
        authUnSure: function () { //退回重报
            this.showAudit = true; //打开理由填报框
        },
        sureUnSure: function () { //审核不通过（提交） ;
            this.DataReview(this.Id, '0', this.strMsg);
            this.showAudit = false; //关闭理由填报框
            this.AuthType=false;
        },
        cancelUnSure: function () {
            this.showAudit = false; //关闭审核理由框
            this.AuthType=false;
        },
        //数据审核
        DataReview: function (ReportId, Status, Msg) {
            var self = this;
            self.searchModel.Id = ReportId;
            self.searchModel.Status = Status;
            self.searchModel.Opinion = Msg;
            self.$Modal.confirm({
                title: '提示信息',
                content: '<p>数据审核后，不能再更改，是否继续提交？</p>',
                onOk: () => {
                    self.$http.post('Report/PostUpStatus', self.searchModel).then(function (res) {
                        if (res.data.status === 1) {
                            self.$Notice.success({
                                title: '数据审核成功',
                                desc: false
                            });
                            self.searchModel.Status = '';
                            self.getPageData(); //读取分页数据
                            self.AuthType=false;
                        } else {
                            self.$Notice.success({
                                title: '数据审核失败',
                                desc: res.data.messages
                            });
                        }
                    });
                },
                onCancel: () => { }
            });
        }
    },
    //创建Vue页面方法
    created: function () {
        //创业Vue前调用获取this.datas: {},//table数据对象
        this.getPageData();
        this.SearchAreaList();
    },
    watch: {
        //需要监听的在此处新增监听对象
    }
}
</script>
